package com.github.wxiaoqi.security.common.constant;

/**
 * Created by ace on 2017/8/29.
 * @author dzl
 */
public class CommonConstants {
    public final static String RESOURCE_TYPE_MENU = "menu";
    public final static String RESOURCE_TYPE_BTN = "button";

    /**
     * 用户token异常
     */
    public static final Integer EX_USER_INVALID_CODE = 40101;
    public static final Integer EX_USER_PASS_INVALID_CODE = 40001;

    /**
     * 客户端token异常
     */
    public static final Integer EX_CLIENT_INVALID_CODE = 40301;
    public static final Integer EX_CLIENT_FORBIDDEN_CODE = 40331;
    public static final Integer EX_OTHER_CODE = 500;
    public static final String CONTEXT_KEY_USER_ID = "currentUserId";
    public static final String CONTEXT_KEY_USERNAME = "currentUserName";
    public static final String CONTEXT_KEY_USER_NAME = "currentUser";
    public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken";
    public static final String JWT_KEY_USER_ID = "userId";
    public static final String JWT_KEY_NAME = "name";

    public static final String CHARACTER_LEFT_BRACE = "{";

    public static final String CHARACTER_COMMA = ",";

    public static final String CHARACTER_UNKNOWN = "unknown";

    public static final String CHARACTER_CLIENT = "client/token";

    public static final String CHARACTER_FOWARD_SLASH = "/";

    public static final String CHARACTER_CODE = "code";

    public static final String CHARACTER_PAGE = "page";

    public static final String CHARACTER_LIMIT = "limit";

    public static final String CHARACTER_POINT = ".";

    public static final int NUMBER_EIGHT = 8;
}
